package com.example.lenovo.shijian;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class WebViewTest extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web_view_test);

        WebView webview = (WebView) findViewById(R.id.webview);

        webview.loadUrl("www.baidu.com");
        webview.getSettings().setJavaScriptEnabled(true);
        webview.setWebViewClient(new WebViewClient());
        // webView.loadUrl("javascript:fangda()");


        //webView.addJavascriptInterface(new WebH5(),"android");
    }

    class WebH5 {

    }
}
